#include "mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindowClass())
{
    ui->setupUi(this);
    m_diceDialog = new QDiceDialog(this);
    m_pcdialog = new QPCDialog(this);
    connect(ui->diceBtn, &QPushButton::clicked, this, &MainWindow::onShowDiceDialog);
    connect(ui->PCBtn, &QPushButton::clicked, this, &MainWindow::onShowPCDialog);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::onShowPCDialog()
{
    m_pcdialog->exec();
}

void MainWindow::onShowDiceDialog()
{
    m_diceDialog->exec();
}
